package com.zhangj.springcloud.sevice;

import com.zhangj.springcloud.sevice.impl.PaymentFallbackImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @InterfaceName PaymentService
 * @Description
 * @Author zhangjie
 * @Date 2022/1/18 9:38
 * @Version 1.0
 */

@FeignClient(name="CLOUD-HYSTRIX-PAYMENT-SERVICE",fallback = PaymentFallbackImpl.class)
public interface PaymentService {

    @GetMapping("/payment/hystrix/ok/{id}")
    public String paymentInfo_OK(@PathVariable("id") Integer id);

    @GetMapping("/payment/hystrix/timeout/{id}")
    public String paymentInfo_TimeOut(@PathVariable("id") Integer id);
}
